import request from '@/utils/request'

export function addPageValue(data) {
  return request({
    url: '/UDform/pageValue',
    method: 'post',
    data: data
  })
}

export function editPageValue(data) {
  return request({
    url: '/UDform/pageValue',
    method: 'put',
    data: data
  })
}

// 查询页面值详细
export function getPageValue(id,table) {
  return request({
    url: '/UDform/pageValue/find?table='+table+'&id=' + id,
    method: 'get'
  })
}

// 查询页面值列表
export function getAllPageValue(data) {
  return request({
    url: '/UDform/pageValue/findAll',
    method: 'post',
    data: data
  })
}

// 删除表单值
export function delPageValue(data){
  return request({
    url:'/UDform/pageValue/delete',
    method:'delete',
    data:data
  })
}

// 提交申请
export function submitApply(data){
  return request({
    url:'/UDform/pageValue/submitApply',
    method:'put',
    data:data
  })
}

// 获取表关联数据
export function getFromValue(id) {
  return request({
    url:'/UDform/pageValue/relationShip/'+ id,
    method:'get'
  })
}